<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/1
 * Time: 16:02
 */

namespace ttxx;

use user\user;
use user\commonUser;
require'user/user.php';
require 'user/commonUser.php';

class manage{
    private $arr=[];
    public function opensite (){
        $this->arr[]=$this->create1();
        $this->arr[]=$this->create2();

        echo '<br/>数组个数：'.count($this->arr).'<br/>';
    }

    private function create1(){
        $user=new user();
        $this->showme();
        $user->myleave();
        return $user;
    }
    private function create2(){
        $user1=new commonUser();
        $this->showme();
        $user1->myLeave();
        return $user1;
    }
    private function showme(){
        echo '<br/>在线人数：'.user::getusernum().'<br/>';
    }
}

$manage=new manage();
$manage->opensite();